	// 消息闪动
	function shinefn(){
		var getRed = setInterval(function(){
			$(".msgT a").toggleClass("getred");
		}, 500);
	}

	function shine2fn(){
		setInterval(function(){
			$(".ua2").toggleClass("getred");
		}, 500);
	}

$(document).ready(function(){
	//搜索栏margin值修正
	var $searKeyword=$(".searKeyword a:last").css("margin","0");
	/* 用户经验条*/
	var lstart = parseInt($(".lstart").text());
	var lend = parseInt($(".lend").text());
	var pensent = lstart/lend;
	var plen = parseInt($(".rankT").css("width"));
	var nlen = Math.round(plen*pensent);
	$(".rankS").css("width",nlen);
	$(".rankT").attr("title",lstart+"/"+lend);
	/*用户经验条 end*/



	/*菜单*/
	var $menuCate = $(".menuCate");
	var hdMenuA = $(".hdMenu ul:first > li > a");
		$menuCate.hover(function(){
			if($(this).index()>4){$(this).find(".subMenu").css("right",-2+"px")}else{$(this).find(".subMenu").css("left",0)}
			$(this).addClass("act").siblings().removeClass("act");
		 	var ddl = $(this).find(".subMenu dl");
	 		var len = ddl.length;
	 		var $subMenu = $(this).find(".subMenu");
 			if ($subMenu.children('div').length > 0)
 			{
 				$subMenu.css("width",(102*len)+130);
 			}
 			else
 			{
 				$subMenu.css("width", 102*len);
 			}

		},function(){
 			$(this).removeClass("act");
 		});

	/*菜单 end*/
	
	/*右旋浮窗*/
	var $hdTop = $(".hdTop");
	var $goTop = $(".go-top");
	var $popupRight = $(".popupRight");
	$(window).scroll(function(){
		var popHei = $popupRight.height();
		var cliHei = $(window).height();
		$(window).resize(function(){
			cliHei = $(window).height();
			$popupRight.hide();
		})
		var	popTop = cliHei - popHei -30;
		var Top=$(document).scrollTop();
		/*ie6*/
		if(jQuery.browser.msie&&jQuery.browser.version==6){
			if(Top>=150){
				$hdTop.addClass("fixed").css({top:Top,display:"none"}).fadeIn(500);
				$popupRight.show().css({top:Top+popTop,display:"none"}).fadeIn(500);
				if ((Top + 300) > ($(document).height() - $(window).height()))
				{
					$popupRight.css('top', $(document).height() - $('.footer').height() - 280);
				}
				else
				{
					$popupRight.show().css({top:Top+popTop,display:"none"}).fadeIn(500);
				}
			}else if(Top==0){
				$hdTop.removeClass("fixed").css({top:0,display:"block"});
				$popupRight.hide();
			}else{
				$hdTop.removeClass("fixed").css(top,0);
				$popupRight.hide();
			}
		}
		/*非ie6*/
		else{
			if(Top>150){
				$hdTop.addClass("fixed");
				$popupRight.show();
				if ((Top + 300) > ($(document).height() - $(window).height()))
				{
					$popupRight.css('position', 'absolute').css('top', $(document).height() - $('.footer').height() - 280);
				}
				else
				{
					$popupRight.css('position', 'fixed').css('top', $(window).height() - 300);
				}
			}else if(Top==0){
				$hdTop.removeClass("fixed");
				$popupRight.hide();
			}else{$popupRight.css('position', 'fixed').hide();}
		}
	})

	/*返回顶部*/
	$goTop.click(function(){
		$(document).scrollTop(0);return false;
	});
	

	deloutline();
	noBor(".cartGlist","li",3,"last");
	noBor(".subMenu","dl",2,"last");
	noBor(".catePopup","li",3,"last");

	addcla(".userZh","cur",2);
	addcla(".userCenter","cur",2);
	addcla(".userMsg","cur",2);
	addcla(".ser24","cur",2);
	addcla(".hdCart","cur",2);

	 
	 
	//头部公告滚动
	 	var $topAdConul = $(".topAdCon ul");
	function topAdfn(){
		if($topAdConul.find("li").length>1){
			$topAdConul.animate({"marginTop":-24},1000,function(){
				$topAdConul.css("marginTop",0).find("li:first").appendTo(this);
			})
		}else{return false;}
	}
	var topAd = setInterval(topAdfn,2500);
	$topAdConul.hover(function(){
		clearInterval(topAd);
	},function(){
		topAd = setInterval(topAdfn,2500);
	})
	
	//加入头部手机二维码
	$('.commhead_phone map .phone_weixin').bind('mouseenter',function(){
		$('.commhead_phone .commhead_weixin').css('display','block').bind('mouseleave',function(){
		$(this).css('display','none');
	});
		$('.commhead_phone .commhead_phoneClient').css('display','none');
	})
	
	$('.commhead_phone map .phone_youpin').bind('mouseenter',function(){
		$('.commhead_phone .commhead_weixin').css('display','none');
		$('.commhead_phoneClient').css('display','block');
	})
	
	$('.commhead_phone .commhead_phoneClient ul li.phone1').bind('mouseenter',function(){
		$(this).css({'border-left':'1px solid #fff','color':'#d30070'});
		$('.commhead_phone .phone1_div').css('display','block');
	}).bind('mouseleave',function(){
		$(this).css({'border-left':'1px solid #dbdbdb','color':'#777'});
		$('.commhead_phone .phone1_div').css('display','none');
	});
	
	$('.commhead_phone .commhead_phoneClient ul li.phone2').bind('mouseenter',function(){
		$(this).css({'border-left':'1px solid #fff','color':'#d30070'});
		$('.commhead_phone .phone2_div').css('display','block');
	}).bind('mouseleave',function(){
		$(this).css({'border-left':'1px solid #dbdbdb','color':'#777'});
		$('.commhead_phone .phone2_div').css('display','none');
	});
	
	$('.commhead_phone .commhead_phoneClient ul li.phone3').bind('mouseenter',function(){
		$(this).css({'border-left':'1px solid #fff','color':'#d30070'});
		$('.commhead_phone .phone3_div').css('display','block');
	}).bind('mouseleave',function(){
		$(this).css({'border-left':'1px solid #dbdbdb','color':'#777'});
		$('.commhead_phone .phone3_div').css('display','none');
	});
	
	$('.commhead_phone .commhead_phoneClient').bind('mouseleave',function(){
		$(this).css('display','none');
	})
	
	$('.commhead_phone').bind('mouseleave',function(){
		$('.commhead_phone .commhead_weixin').css('display','none');
		$('.commhead_phone .commhead_phoneClient').css('display','none');
	})
	
	$('.commhead_phone map .phone_sc').bind('mouseenter',function(){
		$('.commhead_phone .commhead_weixin').css('display','none');
		$('.commhead_phone .commhead_phoneClient').css('display','none');
	})
	
	$('.commhead_phone map .phone_tx').bind('mouseenter',function(){
		$('.commhead_phone .commhead_weixin').css('display','none');
		$('.commhead_phone .commhead_phoneClient').css('display','none');
	})
	
	$('.commhead_phone map .phone_xl').bind('mouseenter',function(){
		$('.commhead_phone .commhead_weixin').css('display','none');
		$('.commhead_phone .commhead_phoneClient').css('display','none');
	})
	
	//添加收藏
	$(".commhead_phone map .phone_sc").click(function(){
		var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd':'Ctrl';
		if(document.all)
		{
		  window.external.addFavorite(window.location,document.title);
		}
		else if(window.sidebar)
		{ 
		   window.sidebar.addPanel(document.title,window.location);
		}
		else{
		   alert('添加失败，请用Ctrl+D进行添加');
		}
   });

	
})


	// 登录浮框
	 var $lbTit = $(".lbTit li");
	 var $lbCon = $(".lrbox > div")
	 $lbTit.click(function(){
	 	var lbindex = $lbTit.index(this);
	 	$(this).addClass("cur").siblings().removeClass("cur");
	 	$lbCon.eq(lbindex).show().siblings().hide();
	 })

	 function loginFn(){
	
		$ypuserBox = $(".ypuserBox");
	
		var lhei = $ypuserBox.outerHeight();
		var lwid = $ypuserBox.outerWidth();
		var wwid = $(window).width();
		var whei = $(window).height();
		turn = true;
	 	var sTop = $(document).scrollTop();
	 	var topX = (wwid-lwid)/2;
	 	var topY = (whei-lhei)/2+sTop;
	 	if(turn){
	 		$ypuserBox.show();
	 		$ypuserBox.css({top:topY,left:topX});}
	 		turn=false;
	 }
	 function loginclofn(){
	 	$ypuserBox.hide();
	 	turn=true;
	 }
	 
/*7*24文字闪烁*/
$(document).ready(function(){
	setInterval(action,500);
	function action(){
		if($('.ser24 p.serT a').css('color') == 'rgb(112, 112, 112)'){
			$('.ser24 p.serT a').css('color','#d23956')	
		}else{
			$('.ser24 p.serT a').css('color','#707070')	
		}
	}	
});	
	 
